<?php

/**
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; version 3 of the License.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
 */
/**
 * Shopping cart item class
 * @package Util
 * @author Vincze Tamás
 * @version 0.2
 */

namespace Util\Cart;

class Item extends ACartItem {

	/**
	 * Sets the item data
	 * @access public
	 * @access static
	 * @final
	 * @var float $netPrice
	 * @var float $vat
	 * @var mixed $id
	 * @var string $name
	 * @var int $qty
	 * @var mixed $misc
	 * @return ACartItem
	 */
	public static function get($netPrice, $vat, $id, $name, $qty = 1, $misc = null) {
        $options = array("netPrice" => $netPrice, "vat" => $vat, "misc" => $misc);
        $options["id"] = $id;
        $options["name"] = $name;
        $options["qty"] = $qty;
        $options["qtyModifiable"] = true;
        $options["addsOrSubsPrice"] = true;
        $options["canBeSubstracted"] = true;
		return new self($options);
	}    
    
}

?>
